import {actionTypes} from './index'
import {fromJS} from 'immutable'
const defaultState = fromJS({
    loginStatus: false,
    buttonStatus: ''
})


export default (state = defaultState, action)=>{
    switch (action.type) {
        case actionTypes.CHANG_LOGIN_STATUS:
            return state.set('loginStatus',action.value)
        case actionTypes.CHANGE_BUTTON_STATUS:
            return state.set('buttonStatus',action.value)
        default:
            return state
    }
}
